In a control apparatus including a controller that controls the entire apparatus and a plurality of motors, in general, the controller and the motors are connected by serial communication. Because the devices are connected by the serial communication, it is possible to realize wire-saving and improvement of maintainability of the entire apparatus.
In general, the motors include motors and motor driving devices. The serial communication is performed between the controller and the motor driving devices. By the serial communication, moving commands for positions, speeds, torques, and the like are transmitted from the controller to the motor driving devices, and control state amounts such as positions, speeds, and driving current values of the motors are transmitted from the motor driving devices.
In such serial communication for driving control for the purpose of motor control, the controller and the motor driving devices transmit the moving commands and the control state amounts to each other at a fixed interval to stably perform the operation of the motors. The controller performs serial communication control with the fixed interval set as a communication period. The controller sequentially updates the moving commands and transmits the moving commands to the motor driving devices at the fixed communication period. The controller performs the motor control such that the motor driving devices perform reception processing at every communication period and follow commands extracted from received data. Consequently, the controller can control the motors with desired positions, speeds, torques, and the like.
According to necessity, the controller applies, at every communication period, reception processing to the control state amounts sequentially updated and transmitted from the motor driving devices at the fixed communication period, applies necessary control processing to the motor driving devices, based on necessary control state amounts extracted from received data, reflects a result of the control processing on next motor control commands, and controls the entire motor driving devices.
In the serial communication for driving control, because the commands and the state amounts are sequentially updated as explained above, a reception control section in the serial communication updates received data at every communication period. In some case, an FIFO (First In, First Out) buffer is used for a buffer memory, which stores the received data, to retain a plurality of received data at one communication period or retain a plurality of received data at a plurality of communication periods.
When the reception control section retains a plurality of received data at a plurality of communication period, in the serial communication for driving control, once communication between apparatuses is started, a specified communication frame is periodically transmitted at a specified communication period. Therefore, the reception control section periodically stores received data of communication frames in the buffer memory for reception according to a management table for managing a storage position of the received data (see, for example, Patent Literature 1).
As in the normal serial communication, in the serial communication for driving control, when the communication frame is transmitted, the communication frame is accompanied by check data for detecting data corruption on a communication path. A reception side checks reliability of received data from the received data and the check data and retains a result of the check as a received data state. When a plurality of packets of received data is retained, it is necessary to retain received data states by the amount of the retained received data (see, for example, Patent Literature 2).
The communication frame of the serial communication is transmitted with specific bit patterns added to the start and the end of data to be transmitted. The specific bit pattern at the start is referred to as start flag. The bit pattern at the end is referred to as end flag. A receiving section identifies the start flag to start reception processing for the communication frame. The receiving section recognizes, with the end flag, the end of the communication frame to receive one communication frame.